#ifndef __iStreamable__
#define __iStreamable__

#include "neiderra/core/iException.h"

namespace neiderra
{
	namespace core
	{
		class iInputStream;
        class iOutputStream;

		class iStreamable
		{
		public:
			iStreamable();

			// 
			// Exceptions
			//
			class EBadStream : public iException
			{
			public:
				EBadStream(): iException("bad stream") {}
			};

			// 
			// iStreamable interface
			//
			virtual void setInputStream(iInputStream*);
			virtual void setOutputStream(iOutputStream*);
			virtual iInputStream* getInputStream();
			virtual iOutputStream* getOutputStream();
		private:
			iInputStream* _inputStream;
			iOutputStream* _outputStream;
		};
	}
}

#endif

